import { connect } from 'umi'
import { Form, Input, Button, Checkbox, Card } from 'antd';
import styles from './index.less';
import logo from '@/assets/logow.svg'


const Login = ({ global }) => {

  const onFinish = (values) => {
    console.log('Success:', values);
  };

  return (
    <div className={styles.login}>
      <img className={styles.logo} src={logo} alt="logo" />
      <Card className={styles.card} title="操作员登录" bordered={false} >
        <Form
          className={styles.form}
          initialValues={{ remember: true }}
          onFinish={onFinish}
        >
          <Form.Item
            label="账号："
            name="username"
            rules={[{ required: true, message: '请输入账号!' }]}
          >
            <Input />
          </Form.Item>

          <Form.Item
            label="密码："
            name="password"
            rules={[{ required: true, message: '请输入密码!' }]}
          >
            <Input.Password />
          </Form.Item>

          <Form.Item >
            <Button type="primary" htmlType="submit">
              登录
        </Button>
          </Form.Item>
        </Form>
      </Card>
      <div className={styles.footer}>技术支持：三点三网络科技有限公司 © 2021-2022</div>

    </div>
  )
}

export default connect(({ global }) => ({
  global,
}))(Login);